# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2FieldSelectionOptionsChoice do
  @moduledoc """
  Selection field choice.

  ## Attributes

  *   `appliedCapabilities` (*type:* `GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceAppliedCapabilities.t`, *default:* `nil`) - Output only. The capabilities related to this choice on applied metadata.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time this choice was created.
  *   `creator` (*type:* `GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2UserInfo.t`, *default:* `nil`) - Output only. The user who created this choice.
  *   `disableTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time this choice was disabled. This value has no meaning when the choice is not disabled.
  *   `disabler` (*type:* `GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2UserInfo.t`, *default:* `nil`) - Output only. The user who disabled this choice. This value has no meaning when the option is not disabled.
  *   `displayHints` (*type:* `GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceDisplayHints.t`, *default:* `nil`) - Output only. UI display hints for rendering a choice.
  *   `id` (*type:* `String.t`, *default:* `nil`) - The unique value of the choice. This ID is autogenerated. Matches the regex: `([a-zA-Z0-9_])+`.
  *   `lifecycle` (*type:* `GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2Lifecycle.t`, *default:* `nil`) - Output only. Lifecycle of the choice.
  *   `lockStatus` (*type:* `GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2LockStatus.t`, *default:* `nil`) - Output only. The LockStatus of this choice.
  *   `properties` (*type:* `GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceProperties.t`, *default:* `nil`) - Basic properties of the choice.
  *   `publishTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time this choice was published. This value has no meaning when the choice is not published.
  *   `publisher` (*type:* `GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2UserInfo.t`, *default:* `nil`) - Output only. The user who published this choice. This value has no meaning when the choice is not published.
  *   `schemaCapabilities` (*type:* `GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceSchemaCapabilities.t`, *default:* `nil`) - Output only. The capabilities related to this option when editing the option.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time this choice was updated last.
  *   `updater` (*type:* `GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2UserInfo.t`, *default:* `nil`) - Output only. The user who updated this choice last.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :appliedCapabilities =>
            GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceAppliedCapabilities.t()
            | nil,
          :createTime => DateTime.t() | nil,
          :creator => GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2UserInfo.t() | nil,
          :disableTime => DateTime.t() | nil,
          :disabler => GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2UserInfo.t() | nil,
          :displayHints =>
            GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceDisplayHints.t()
            | nil,
          :id => String.t() | nil,
          :lifecycle => GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2Lifecycle.t() | nil,
          :lockStatus =>
            GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2LockStatus.t() | nil,
          :properties =>
            GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceProperties.t()
            | nil,
          :publishTime => DateTime.t() | nil,
          :publisher => GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2UserInfo.t() | nil,
          :schemaCapabilities =>
            GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceSchemaCapabilities.t()
            | nil,
          :updateTime => DateTime.t() | nil,
          :updater => GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2UserInfo.t() | nil
        }

  field(:appliedCapabilities,
    as:
      GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceAppliedCapabilities
  )

  field(:createTime, as: DateTime)
  field(:creator, as: GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2UserInfo)
  field(:disableTime, as: DateTime)
  field(:disabler, as: GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2UserInfo)

  field(:displayHints,
    as:
      GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceDisplayHints
  )

  field(:id)
  field(:lifecycle, as: GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2Lifecycle)
  field(:lockStatus, as: GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2LockStatus)

  field(:properties,
    as:
      GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceProperties
  )

  field(:publishTime, as: DateTime)
  field(:publisher, as: GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2UserInfo)

  field(:schemaCapabilities,
    as:
      GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceSchemaCapabilities
  )

  field(:updateTime, as: DateTime)
  field(:updater, as: GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2UserInfo)
end

defimpl Poison.Decoder,
  for: GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2FieldSelectionOptionsChoice do
  def decode(value, options) do
    GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2FieldSelectionOptionsChoice.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2FieldSelectionOptionsChoice do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
